﻿using System;
using System.Web;
using YawetagLib.Facade;

namespace YawetagLib.Web.Facade
{
    public class WebFacadeFactory : BaseFacadeFactory
    {
        public WebFacadeFactory(HttpContextBase httpContext)
        {
            HttpContext = httpContext;
        }

        protected override BaseFacade GetFacadeInstance(Type facadeType)
        {
            return (BaseFacade)Activator.CreateInstance(facadeType, this, ServiceBroker, HttpContext);
        }

        private HttpContextBase HttpContext { get; set; }
    }
}
